Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow complete channel list throttled reload on internet connection recovery #2123

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

MartinCupela
Copy link
Contributor

🎯 Goal

Allow to load the most recent updates to the ChannelList after the internet connection loss. The StreamChat client's recovery mechanism has the following shortcomings:

  • re-queries only the channels that have already been loaded into the UI
  • does not throttle the channel list queries.

On the other side, the SDK's recovery mechanism just reloads the channel list based on the filters, sort and options parameters originally provided to ChannelList through props.

This is an opt-in feature that has to be enabled as described in the documentation.

Currently it is not possible to load both the latest updates that would include new channels at the top and the originally loaded channels due to the fact that after re-querying the originally loaded channels we loose track of the next page for the channels pagination.

oliverlaz
oliverlaz previously approved these changes Oct 11, 2023
src/components/ChannelList/hooks/usePaginatedChannels.ts Outdated Show resolved Hide resolved
Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (acf0621) 83.21% compared to head (6a5dfbf) 83.24%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2123      +/-   ##
===========================================
+ Coverage    83.21%   83.24%   +0.03%     
===========================================
  Files          293      293              
  Lines         7013     7032      +19     
  Branches      1997     2003       +6     
===========================================
+ Hits          5836     5854      +18     
  Misses         848      848              
- Partials       329      330       +1     
Files Coverage Δ
src/components/ChannelList/ChannelList.tsx 93.44% <ø> (ø)
...mponents/ChannelList/hooks/usePaginatedChannels.ts 96.29% <95.23%> (-0.85%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MartinCupela MartinCupela merged commit 252cac3 into develop Oct 11, 2023
3 of 4 checks passed
@MartinCupela MartinCupela deleted the feat/channel-list-recovery branch October 11, 2023 14:19
@MartinCupela MartinCupela mentioned this pull request Oct 11, 2023
github-actions bot pushed a commit that referenced this pull request Oct 11, 2023
# [10.14.0](v10.13.1...v10.14.0) (2023-10-11)

### Features

* allow complete channel list throttled reload on internet connection recovery ([#2123](#2123)) ([252cac3](252cac3))
@github-actions
Copy link

🎉 This PR is included in version 10.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Oct 12, 2023
# [11.0.0-rc.1](v10.13.1...v11.0.0-rc.1) (2023-10-12)

### Bug Fixes

* **emoji-mart:** new reactions  ([#1947](#1947)) ([2050708](2050708))

### Features

* allow complete channel list throttled reload on internet connection recovery ([#2123](#2123)) ([252cac3](252cac3))

### BREAKING CHANGES

* **emoji-mart:** `reactionOptions` signature has changed, see [release guide](https://github.com/GetStream/stream-chat-react/blob/7a19e386aa3adcc5741a7f0d92bc816a1a424094/docusaurus/docs/React/release-guides/new-reactions.mdx) for more information
@github-actions
Copy link

🎉 This PR is included in version 11.0.0-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants